package com.hos.net.req.pat;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.hos.net.req.BaseReq;
import com.hos.net.res.MsgHint;

/**
 * 微信登录
 * Created by Administrator on 2018/8/24 0024.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class PatWXLoginReq extends BaseReq {
    //微信id
    public String patWxId;
    //微信头像
    public String patWxHead;
    //微信名称
    public String patWxName;
    @JsonIgnore
    public String hint;
    // (false 检验失败)
    @JsonIgnore
    public boolean isVerifyParameter() {
        if (patWxId == null || patWxId == "") {
            hint = new MsgHint("姓名不能为空").toJson();
            return false;
        }
        if (patWxHead == null || patWxHead == "") {
            hint = new MsgHint("微信id不能为空").toJson();
            return false;
        }
        if (patWxName == null || patWxName == "") {
            hint = new MsgHint("微信昵称不能为空").toJson();
            return false;
        }
        return true;
    }
}
